package com.example.myapplication;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class AssignmentDetailActivity extends AppCompatActivity {
    private ImageView imageViewAssignment;
    private TextView textViewTitle, textViewDueDate, textViewDescription;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_assignment_detail);

        // 获取传递的数据
        String assignmentTitle = getIntent().getStringExtra("assignmentTitle");
        String assignmentDueDate = getIntent().getStringExtra("assignmentDueDate");
        String assignmentDescription = getIntent().getStringExtra("assignmentDescription");

        // 绑定视图
        imageViewAssignment = findViewById(R.id.imageViewAssignment);
        textViewTitle = findViewById(R.id.textViewTitle);
        textViewDueDate = findViewById(R.id.textViewDueDate);
        textViewDescription = findViewById(R.id.textViewDescription);


        textViewTitle.setText(assignmentTitle);
        textViewDueDate.setText("截止日期: " + assignmentDueDate);
        textViewDescription.setText(assignmentDescription);
    }
}
